

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>3.3. ZBarReaderController Class Reference &mdash; ZBar iPhone SDK Documentation</title>
    <link rel="stylesheet" href="_static/style.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '1.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/zbar.ico"/>
    <link rel="top" title="ZBar iPhone SDK Documentation" href="index.html" />
    <link rel="up" title="3. API Reference" href="apiref.html" />
    <link rel="next" title="3.4. ZBarReaderDelegate Protocol Reference" href="ZBarReaderDelegate.html" />
    <link rel="prev" title="3.2. ZBarImageScanner Class Reference" href="ZBarImageScanner.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="ZBarReaderDelegate.html" title="3.4. ZBarReaderDelegate Protocol Reference"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="ZBarImageScanner.html" title="3.2. ZBarImageScanner Class Reference"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">ZBarSDK 1.0</a> &raquo;</li>
          <li><a href="apiref.html" accesskey="U">3. API Reference</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="zbarreadercontroller-class-reference">
<h1>3.3. ZBarReaderController Class Reference<a class="headerlink" href="#zbarreadercontroller-class-reference" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="ZBarReaderController">
<em class="property">class </em><tt class="descname">ZBarReaderController</tt><a class="headerlink" href="#ZBarReaderController" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Inherits from:</th><td class="field-body"><tt class="xref cpp cpp-class docutils literal"><span class="pre">UIImagePickerController</span></tt></td>
</tr>
</tbody>
</table>
<p>This is the controller to use for scanning images selected by a
<tt class="xref cpp cpp-class docutils literal"><span class="pre">UIImagePickerController</span></tt> either captured manually using the camera,
or selected from the Photo Library.  For more information, see
<a class="reference internal" href="picker.html"><em>Scanning a User-Selected Image</em></a>.</p>
<p>It can support automatic capture from the camera only if the library is
re-built to use private APIs (see <a class="reference internal" href="compat.html"><em>Backward Compatibility</em></a>).</p>
</dd></dl>

<div class="section" id="properties">
<h2>3.3.1. Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2>
<blockquote>
<dl class="member">
<dt id="scanner__ZBarImageScannerP">
<a class="reference internal" href="ZBarImageScanner.html#ZBarImageScanner" title="ZBarImageScanner">ZBarImageScanner*</a> <tt class="descname">scanner</tt><a class="headerlink" href="#scanner__ZBarImageScannerP" title="Permalink to this definition">¶</a></dt>
<dd><p>Access to the image scanner for configuration. (read-only)</p>
</dd></dl>

<dl class="member">
<dt id="readerDelegate__id:ZBarReaderDelegate:">
id&lt;ZBarReaderDelegate&gt; <tt class="descname">readerDelegate</tt><a class="headerlink" href="#readerDelegate__id:ZBarReaderDelegate:" title="Permalink to this definition">¶</a></dt>
<dd><p>The delegate that will be notified when new barcode results are
available.</p>
</dd></dl>

<dl class="member">
<dt id="showsZBarControls__BOOL">
BOOL <tt class="descname">showsZBarControls</tt><a class="headerlink" href="#showsZBarControls__BOOL" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether to display a default control set consisting of cancel, scan and
info buttons.  Disable these if you provide your own controls using the
<a class="reference internal" href="#cameraOverlayView__UIViewP" title="cameraOverlayView"><tt class="xref cpp cpp-member docutils literal"><span class="pre">cameraOverlayView</span></tt></a>.  Enabling this automatically disables the
system controls <a class="reference internal" href="#showsCameraControls__BOOL" title="showsCameraControls"><tt class="xref cpp cpp-member docutils literal"><span class="pre">showsCameraControls</span></tt></a>.  (Default <tt class="docutils literal"><span class="pre">YES</span></tt>).</p>
</dd></dl>

<dl class="member">
<dt id="showsHelpOnFail__BOOL">
BOOL <tt class="descname">showsHelpOnFail</tt><a class="headerlink" href="#showsHelpOnFail__BOOL" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether to automatically display the integrated help viewer when an
image fails to decode.  Even if this is disabled, the integrated help
may still be presented manually using <tt class="docutils literal"><span class="pre">showHelpWithReason:</span></tt>.
(Default <tt class="docutils literal"><span class="pre">YES</span></tt>)</p>
</dd></dl>

<dl class="member">
<dt id="cameraMode__ZBarReaderControllerCameraMode">
<a class="reference internal" href="#ZBarReaderControllerCameraMode" title="ZBarReaderControllerCameraMode">ZBarReaderControllerCameraMode</a> <tt class="descname">cameraMode</tt><a class="headerlink" href="#cameraMode__ZBarReaderControllerCameraMode" title="Permalink to this definition">¶</a></dt>
<dd><p>Scanning mode to use with the camera.  It is generally appropriate to
leave this at the default.</p>
</dd></dl>

<dl class="member">
<dt id="tracksSymbols__BOOL">
BOOL <tt class="descname">tracksSymbols</tt><a class="headerlink" href="#tracksSymbols__BOOL" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether to display the tracking rectangle around detected barcodes.</p>
</dd></dl>

<dl class="member">
<dt id="takesPicture__BOOL">
BOOL <tt class="descname">takesPicture</tt><a class="headerlink" href="#takesPicture__BOOL" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether to take a full picture (with <tt class="docutils literal"><span class="pre">takePicture</span></tt>) when a barcode
is detected with <tt class="docutils literal"><span class="pre">ZBarReaderControllerCameraModeSampling</span></tt>.  The
resulting image will be delayed from the actual decode.</p>
</dd></dl>

<dl class="member">
<dt id="enableCache__BOOL">
BOOL <tt class="descname">enableCache</tt><a class="headerlink" href="#enableCache__BOOL" title="Permalink to this definition">¶</a></dt>
<dd><p>This property is deprecated and should not be modified.</p>
</dd></dl>

<dl class="member">
<dt id="scanCrop__CGRect">
CGRect <tt class="descname">scanCrop</tt><a class="headerlink" href="#scanCrop__CGRect" title="Permalink to this definition">¶</a></dt>
<dd><p>Crop images before scanning.  The original image will be cropped to this
rectangle, which should be in normalized image coordinates, x-axis
major.  Defaults to the full image <tt class="docutils literal"><span class="pre">{{0,</span> <span class="pre">0},</span> <span class="pre">{1,</span> <span class="pre">1}}</span></tt>.</p>
</dd></dl>

<dl class="member">
<dt id="maxScanDimension__NSInteger">
NSInteger <tt class="descname">maxScanDimension</tt><a class="headerlink" href="#maxScanDimension__NSInteger" title="Permalink to this definition">¶</a></dt>
<dd><p>Scale image to scan.  After cropping, the image will be scaled if
necessary, such that neither of its dimensions exceed this value.
Defaults to 640.</p>
</dd></dl>

<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The remaining properties are inherited from
<tt class="xref cpp cpp-class docutils literal"><span class="pre">UIImagePickerController</span></tt>.</p>
</div>
<dl class="member">
<dt id="sourceType__UIImagePickerControllerSourceType">
UIImagePickerControllerSourceType <tt class="descname">sourceType</tt><a class="headerlink" href="#sourceType__UIImagePickerControllerSourceType" title="Permalink to this definition">¶</a></dt>
<dd><p>Image source.  Use to select between the camera and photo library.</p>
</dd></dl>

<dl class="member">
<dt id="showsCameraControls__BOOL">
BOOL <tt class="descname">showsCameraControls</tt><a class="headerlink" href="#showsCameraControls__BOOL" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether to display the system camera controls.  Overridden to <tt class="docutils literal"><span class="pre">NO</span></tt>
when <a class="reference internal" href="#showsZBarControls__BOOL" title="showsZBarControls"><tt class="xref cpp cpp-member docutils literal"><span class="pre">showsZBarControls</span></tt></a> is <tt class="docutils literal"><span class="pre">YES</span></tt>.</p>
</dd></dl>

<dl class="member">
<dt id="cameraOverlayView__UIViewP">
UIView* <tt class="descname">cameraOverlayView</tt><a class="headerlink" href="#cameraOverlayView__UIViewP" title="Permalink to this definition">¶</a></dt>
<dd><p>A custom view to display over the camera preview.  The tracking layer
and default controls will be added to this view if they are enabled.</p>
</dd></dl>

<dl class="member">
<dt id="cameraViewTransform__CGAffineTransform">
CGAffineTransform <tt class="descname">cameraViewTransform</tt><a class="headerlink" href="#cameraViewTransform__CGAffineTransform" title="Permalink to this definition">¶</a></dt>
<dd><p>A transform to apply to the camera preview.  Ignored by the reader.
Possibly useful for eg, a digital zoom effect.</p>
</dd></dl>

<dl class="member">
<dt id="allowsEditing__BOOL">
BOOL <tt class="descname">allowsEditing</tt><a class="headerlink" href="#allowsEditing__BOOL" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether to enable the system image editing dialog after a picture is
taken.  Possibly useful to improve reader results in some cases using
manual intervention.</p>
</dd></dl>

</blockquote>
</div>
<div class="section" id="instance-methods">
<h2>3.3.2. Instance Methods<a class="headerlink" href="#instance-methods" title="Permalink to this headline">¶</a></h2>
<blockquote>
<span class="target" id="showhelpwithreason"></span><dl class="describe">
<dt>
<tt class="descname">- (void) showHelpWithReason:(NSString*)reason</tt></dt>
<dd><p>Display the integrated help browser.  Use this with custom overlays if
you don&#8217;t also want to create your own help view.  Should only be called
when the reader is displayed.  The <tt class="docutils literal"><span class="pre">reason</span></tt> argument will be passed to
the <tt class="xref cpp cpp-func docutils literal"><span class="pre">onZBarHelp()</span></tt> javascript function.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Reason :</th><td class="field-body">A string parameter passed to javascript.</td>
</tr>
</tbody>
</table>
</dd></dl>

<span class="target" id="scanimage"></span><dl class="describe">
<dt>
<tt class="descname">- (id &lt;NSFastEnumeration&gt;) scanImage:(CGImageRef)image</tt></dt>
<dd><p>Scan an image for barcodes.  This is a wrapper around
<tt class="docutils literal"><span class="pre">scanner.scanImage</span></tt> that applies scanCrop and maxScanDimension.  Some
additional result filtering is also performed.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Image :</th><td class="field-body">A <tt class="xref cpp cpp-class docutils literal"><span class="pre">CGImage</span></tt> to scan.</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body">The result set containing <a class="reference internal" href="ZBarSymbol.html#ZBarSymbol" title="ZBarSymbol"><tt class="xref cpp cpp-class docutils literal"><span class="pre">ZBarSymbol</span></tt></a> objects.</td>
</tr>
</tbody>
</table>
</dd></dl>

</blockquote>
</div>
<div class="section" id="constants">
<h2>3.3.3. Constants<a class="headerlink" href="#constants" title="Permalink to this headline">¶</a></h2>
<dl class="type">
<dt id="ZBarReaderControllerCameraMode">
<em class="property">type </em><tt class="descname">ZBarReaderControllerCameraMode</tt><a class="headerlink" href="#ZBarReaderControllerCameraMode" title="Permalink to this definition">¶</a></dt>
<dd><p>The scanning mode to use with the camera.</p>
<dl class="docutils">
<dt>ZBarReaderControllerCameraModeDefault</dt>
<dd>The standard mode provided by UIImagePickerController - the user
manually captures an image by tapping a control.  This is the default
unless private APIs are enabled.</dd>
<dt>ZBarReaderControllerCameraModeSampling</dt>
<dd>Automatically capture by taking screenshots with
<tt class="xref cpp cpp-func docutils literal"><span class="pre">UIGetScreenImage()</span></tt>.  Resolution is limited to the screen
resolution, so this mode is inappropriate for longer codes.  Only
available when private APIs are enabled, and becomes the default mode in
that case.</dd>
<dt>ZBarReaderControllerCameraModeSequence</dt>
<dd>Experimental mode that automatically scans by &#8220;rapidly&#8221; scanning
pictures captured with <tt class="docutils literal"><span class="pre">takePicture</span></tt>.  Not recommended for serious
use.</dd>
</dl>
</dd></dl>

<dl class="var">
<dt id="ZBarReaderControllerResults">
NSString *<tt class="descname">ZBarReaderControllerResults</tt><a class="headerlink" href="#ZBarReaderControllerResults" title="Permalink to this definition">¶</a></dt>
<dd><p>The info dictionary key used to return decode results to
<tt class="docutils literal"><span class="pre">imagePickerController:didFinishPickingMediaWithInfo:</span></tt></p>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">3.3. ZBarReaderController Class Reference</a><ul>
<li><a class="reference internal" href="#properties">3.3.1. Properties</a></li>
<li><a class="reference internal" href="#instance-methods">3.3.2. Instance Methods</a></li>
<li><a class="reference internal" href="#constants">3.3.3. Constants</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="ZBarImageScanner.html"
                        title="previous chapter">3.2. ZBarImageScanner Class Reference</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="ZBarReaderDelegate.html"
                        title="next chapter">3.4. ZBarReaderDelegate Protocol Reference</a></p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="ZBarReaderDelegate.html" title="3.4. ZBarReaderDelegate Protocol Reference"
             >next</a></li>
        <li class="right" >
          <a href="ZBarImageScanner.html" title="3.2. ZBarImageScanner Class Reference"
             >previous</a> |</li>
        <li><a href="index.html">ZBarSDK 1.0</a> &raquo;</li>
          <li><a href="apiref.html" >3. API Reference</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010, Jeff Brown et al.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
    </div>
  </body>
</html>